Skip to main content

headingChanged

Type

message

Summary

Sent to the current card of the defaultStack when the heading of the device changes.

Syntax

headingChanged <pHeading>

Description

Handle the headingChanged message if you want to perform tasks when the heading of the device changes.

The headingChanged message is sent to the current card of the defaultStack when the heading of the device changes.

If heading tracking cannot be started (typically due to a lack of calibration) then a trackingError message is sent instead.

Parameters

NameTypeDescription

pHeading

The heading of the device, in degrees relative to true north if available, otherwise relative to magnetic north

Examples

on headingChanged theHeading
updateMapPosition theHeading
-- update the marker on the map showing the current heading
end headingChanged

message: trackingError

command: iphoneSetHeadingCalibrationTimeout

function: mobileCanTrackHeading, mobileCanTrackLocation, mobileCurrentHeading, iphoneHeadingCalibrationTimeout

Compatibility and Support

Introduced

LiveCode 4.6.1

OS

ios

android

Platforms

mobile

Thank you for your feedback!

Was this page helpful?